// by Xeno
private ["_vehicle"];
#include "x_setup.sqf"

#define __Poss _poss = x_sm_pos select 0;
#define __PossAndOther _poss = x_sm_pos select 0;_pos_other = x_sm_pos select 1;

x_sm_pos = [[8593.08,4680.61,0], [8559.56,4702.66,0]]; // index: 13,   Prime Minister,Lopatino
x_sm_type = "normal"; // "convoy"

#ifdef __SMMISSIONS_MARKER__
if (true) exitWith {};
#endif

if (X_Client) then {
	d_current_mission_text = "An enemy colonel is inspecting Isla Strikora. Eliminate him !";
	d_current_mission_resolved_text = "Good job. The colonel is dead.";
};

if (isServer) then {
	__PossAndOther
	["uaz_grenade", 1, "brdm", 1, "uaz_mg", 1, _pos_other,1,0] spawn XCreateArmor;
	sleep 2.123;
	["specops", 2, "basic", 3, _poss,50] spawn XCreateInf;
	sleep 2.111;
	_fortress = "Land_Fort_Watchtower" createVehicle _poss;
	_fortress setDir 55;
	__AddToExtraVec(_fortress)
	sleep 2.123;
	__GetEGrp(_newgroup)
	_sm_vehicle = _newgroup createUnit ["INS_Commander", _poss, [], 0, "FORM"];
	[_sm_vehicle] join _newgroup;
	allunits_add set [count allunits_add, _sm_vehicle];
	#ifndef __TT__
	_sm_vehicle addEventHandler ["killed", {_this call XKilledSMTargetNormal}];
	#endif
	#ifdef __TT__
	_sm_vehicle addEventHandler ["killed", {_this call XKilledSMTargetTT}];
	#endif
	sleep 2.123;
	//_bpos = _fortress buildingPos 1;
	_sm_vehicle setPos position _fortress;
	_leader = leader _newgroup;
	_leader setRank "COLONEL";
	_newgroup allowFleeing 0;
	_newgroup setbehaviour "AWARE";
	_leader disableAI "MOVE";
};

if (true) exitWith {};